<?php 
/* require_once('../model/class.option.php');
$qiOption = new qiOption($DB);
$options = $qiOption->getOption();  */

if($ts == 'update')
{
$upDate = array(
'sitename' => isset($_POST['sitename']) ? $_POST['sitename'] : '',
'sitetitle' => isset($_POST['sitetitle']) ? $_POST['sitetitle'] : '',
'sitekey' => isset($_POST['sitekey']) ? $_POST['sitekey'] : '',
'sitedesc' => isset($_POST['sitedesc']) ? $_POST['sitedesc'] : '',
'siteurl' => isset($_POST['siteurl']) ? $_POST['siteurl'] : '',
'siteicp' => isset($_POST['siteicp']) ? $_POST['siteicp'] : '',
'siteoff' => isset($_POST['siteoff']) ? $_POST['siteoff'] : '',
'siteoffw' => isset($_POST['siteoffw']) ? $_POST['siteoffw'] : '',
'sitereg' => isset($_POST['sitereg']) ? $_POST['sitereg'] : '',
'sitecount' => isset($_POST['sitecount']) ? $_POST['sitecount'] : '',
'siteregw' => isset($_POST['siteregw']) ? $_POST['siteregw'] : ''
);

foreach ($upDate as $key => $val)
{
$DB->query("UPDATE ".DB_PREFIX."options SET option_value='$val' where option_name='$key'");
}

$CACHE->qc_options();

header("Location: index.php?action=option");

}

?>